package com.quartet.modules.system.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.quartet.modules.system.domain.DictDetailPs;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author makejava
 * @since 2021-05-04 12:10:00
 */
@Mapper
public interface DictDetailDao extends BaseMapper<DictDetailPs> {

    @Select("select sdd.label,sdd.label_en as labelEn,sdd.label_singapore as labelSingapore from sys_dict_detail sdd left join sys_dict sd on sd.dict_id=sdd.dict_id where sd.name=#{name} and sdd.value=#{value}")
    DictDetailPs getLabelByValueByCodeAndPid(@Param("value") String value, @Param("name") String name);
}
